package com.syq.exception;

import enums.HospitalExceptionEnums;

/**
 * @ClassName: HospitalException
 * @Description: TODO
 * @Create by: syq
 * @Date: 2022/7/20 21:09
 */


public class HospitalException extends RuntimeException{

    private Integer code;

    public HospitalException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public HospitalException(HospitalExceptionEnums enums) {
        super(enums.getMsg());
        this.code = enums.getCode();
    }
    public Integer getCode() {
        return code;
    }

}
